package com.offcn.webui.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 注册一个请求地址，跳转到登录模板视图
 */
@Configuration
public class AppWebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //在框架注册一个请求地址，跳转到指定模板
        registry.addViewController("/login.html").setViewName("login");
    }
}
